<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>Basic Macro Instructions</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	</head>
	<body>
		<span class="small_head">
			Basic Macro Instructions
		</span>
		<hr>
		<p>
			A macro is a tool which reduces the amount of work which you need to do while playing Clan Lord. Macros are intended to serve as a role-playing aid and make general interaction more interesting. Now we'll get right to introducing how you use macros.
		</p>
		<p>
			First, there should be a macro folder in the folder in which ClanLord is located. Inside this folder you should find a file for each of your characters, and in addition to these one called &quot;Default&quot;. If you don't have these, run ClanLord and join the game. As you join they will be created.
		</p>
		<p>
			You can learn more about how these files work in the manual. For now all you need to know is that Clan Lord loads the macros in the file named after the character you are playing.
		</p>
		<p>
			<b>Simple Macros</b>
		</p>
		<p>
			In Clan Lord a macro has two parts. The &quot;trigger&quot; which tells Clan Lord when to run the macro and &quot;commands&quot; which tell it what to do. There are two different ways to declare a macro. For the simplest ones you can write everything on one line:
		</p>
		
		<blockquote>
			<p>
				<font face="Monaco" size="1">
					trigger command
				</font>
			</p>
		</blockquote>
		<p>
			For example:
		</p>
		<blockquote>
			<p>
				<font face="Monaco" size="1">
					trigger command
					<br>
					&quot;aa&quot; &quot;/action &quot; @text &quot;\r&quot;
				</font>
			</p>
		</blockquote>
		<p>
			This probably looks odd to you, so lets see what is going on:
			<br>
			<br>
			The <strong>&quot;aa&quot;</strong> on the left tells Clan Lord to execute this macro when you type <strong>aa</strong> (no quotes) and hit the return key in the Clan Lord text window.
		</p>
		<p>
			Notice that this is in quotation marks. A command which is just a word in quotation marks is typed to the text pane, so &quot;/action &quot; is typed to the text pane.
		</p>
		
		<p>
			Now look at the <strong>@text</strong>. This is a variable that tells Clan Lord to insert the text which you have typed in the input area (without the beginning &quot;aa&quot;).
		</p>
		<p>
			Now what the heck is that <strong>&quot;\r&quot;</strong>? It is in quotes, so this string is appended after the things we've already been through. \r in a macro's text tells it to act like a return.
		</p>
		<p>
			You type
		</p>
		<blockquote>
			<font face="Monaco" size="1">
				&gt;aa jumps over the stream. (Return)
			</font>
		</blockquote>
		<p>
			The macro makes things act like you typed:
		</p>
		<blockquote>
			<font face="Monaco" size="1">
				&gt;/action jumps over the stream. (Return)
			</font>
		</blockquote>
		<p>
			So what if there is no \r character on the end? Then after you hit return the text would be changed, but it would just sit there in your input text. You would have to hit return again.
		</p>
		<p>
			Now lets look at the second most common type of macro trigger, a key macro:
		</p>
		<p>
			<strong>Trigger command</strong>
		</p>
		<blockquote>
			<font face="Monaco" size="1">
				shift-f1 &quot;Help! I've fallen!\r&quot;
			</font>
		</blockquote>
		<p>
			First, notice that the shift-f1 isn't in quotes like the &quot;aa&quot;. This macro will be triggered whenever you hold down shift and type f1. You can string together as many modifier keys as you want separated by hyphens. The last word must be a key, and it can be almost any key (see the manual for special key and modifier key names). The command of this macro is just text like before.
		</p>
		<p>
			You type:
		</p>
		<blockquote>
			<font face="Monaco" size="1">
				shift and f1 at the same time
			</font>
		</blockquote>
		<p>
			The macro makes things act like you typed:
		</p>
		<blockquote>
			<font face="Monaco" size="1">
				&gt;Help! I've fallen! (Return)
			</font>
		</blockquote>
		<p>
			<b>Commenting Lines</b>
		</p>
		<p>
			You might want to write things in your text file that you don't want Clan Lord to interpret as macros. These are called comments, and you begin any line with // to have Clan Lord ignore it.
		</p>
		<blockquote>
			<p>
				<font face="Monaco" size="1">
					&quot;eat&quot; &quot;/action joyfully chews on &quot; @text &quot;\r&quot;
					<br>
					// This macro is for eating something. &lt;-- This line is ignored!
				</font>
			</p>
		</blockquote>
		<p>
			<b>More Complex Macros</b>
		</p>
		
		<p>
			With the knowledge you now have you can save yourself a lot of typing, but macros also have more powerful features. To use them we must delve a little deeper and master the complex macro form.
		</p>
		<blockquote>
			<p>
				<font face="Monaco" size="1">
					trigger
					<br>
					{
					<br>
				</font>
				<font face="Monaco" size="1">
					command
					<br>
				</font>
				<font face="Monaco" size="1">
					command
					<br>
				</font>
				<font face="Monaco" size="1">
					command
					<br>
				</font>
				<font face="Monaco" size="1">
					(as many commands as you want, 1 per line)
					<br>
					(they don't have to be indented)
					<br>
					}
				</font>
			</p>
		</blockquote>
		<p>
			The first two macros can be rewritten in this form also. Notice that they only have one command (which is to send text ):
		</p>
		
		<blockquote>
			<p>
				<font face="Monaco" size="1">
					&quot;aa&quot;
					<br>
					{
					<br>
					&quot;/action &quot; @text &quot;\r&quot;
					<br>
					}
				</font>
			</p>
		
			<p>
				<font face="Monaco" size="1">
					shift-f1
					<br>
					{
					<br>
					&quot;Help! I've fallen!\r&quot;
					<br>
					}
				</font>
			</p>
		</blockquote>
		<p>
			You've probably guessed that there are more commands than just typing text (otherwise, why would we need this beast?) The most important thing to note is that you can only have one command per line. Lets introduce another command with an example:
		</p>
		
		<blockquote>
			<p>
				<font face="Monaco" size="1">
					&quot;slash&quot;
					<br>
					{
					<br>
					&quot;/action slashes upward with his sword, striking &quot; @text &quot;.\r&quot;
					<br>
					&quot;/pose bless\r&quot;
					<br>
					pause 3
					<br>
					&quot;Take that!\r&quot;
					<br>
					&quot;/pose stand\r&quot;
					<br>
					}
				</font>
			</p>
		</blockquote>
		<p>
			Like we learned before, text can be a command. You can put as many clauses in quotation marks or variables (we call @text a variable) as you want on one line. All of the lines except the middle one, just tell the macro to act like you typed that text. The middle line is different. Its first word is 'pause' which tells the macro not to type out the contents of the line but to pause instead. It waits on this command until 3 frames have passed then continues to the next line. So it looks like this when you are using it.
		</p>
		
		<p>
			You type:
		</p>
		<blockquote>
			<font face="Monaco" size="1">
				&gt;slash Beral
			</font>
		</blockquote>
		<p>
			The macro makes things act like you typed:
		</p>
		<blockquote>
			<font face="Monaco" size="1">
				&gt;/action slashes upward with his sword, striking Beral. (Return)
				<br>
				&gt;/pose bless (Return)
				<br>
				Then it waits for 3 frames before continuing
				<br>
				&gt;Take that! (Return)
				<br>
				&gt;/pose stand (Return)<br>
			</font>
		</blockquote>
		<p>
			This is quite a bit more than we typed in! You now know the basics of how to make macros. The manual includes more detailed information, but you can learn a lot by looking at the default and example macro files.
		</p>
		<hr>
		<p>
			This page is an edited version of the file located at <a href="http://www.deltatao.com/clanlord/macros/basics.html">Clan Lord's Macro Basics</a>.
			<br>
			All copyrights and rights are owned by <a href="http://www.deltatao.com">Delta Tao Software</a>
		</p>
		<p>
			<a href="http://validator.w3.org/check?uri=referer"><img
				src="http://www.w3.org/Icons/valid-html401-blue"
				alt="Valid HTML 4.01 Transitional" height="31" width="88"></a>
		</p>
	</body>
</html>